﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Model.aspx.cs" Inherits="Whir_System_Module_Contents_Model" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>功能模块管理</title>
    <link href="../../Skin/Default/Css/main.css" rel="stylesheet" type="text/css" />

    <script language="javascript" type="text/javascript">
        if (top.location == self.location) { 
            alert('禁止访问子栏目页！将跳转到默认页面');
            top.location='../../Default.aspx';
        } 
    </script>

    <script type="text/javascript" language="javascript">
    
    function ChangeImgItemIcon(icon){
        document.getElementById("ImgItemIcon").src = "../../Image/ModelIcon/"+icon;
    }
    
    function ChangeTxtItemIcon(icon) {
        document.getElementById("txtItemIcon").value = icon;
    }
    </script>

    <!--提示文字-->

    <script src="../../Js/common.js" type="text/javascript"></script>

    <script language="javascript">
        showhint('0','<b>功能模块介绍</b><br/>一个功能模块对应的是数据库的一张表，可以方便添加修改数据库中的字段，便于管理后台表单内容。<br/>你可以选择系统功能模块，也可以选择创建新功能模块。');
    </script>

</head>
<body>
    <form id="form1" runat="server">
        <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DADADA">
            <tr>
                <td class="form_td" colspan="2"><strong>
                    <asp:RadioButton ID="RadioButton1" runat="server" GroupName="sysGroup" Text="系统功能模块"
                        OnCheckedChanged="RadioButton1_CheckedChanged" AutoPostBack="True" /></strong>
                </td>
            </tr>
        </table>
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#DADADA"
            id="tbsys" runat="server" visible="false">
            <tr>
                <td height="30" align="left" class="form_td" colspan="2">
                    <asp:RadioButtonList ID="rblModelTemplate" runat="server" OnSelectedIndexChanged="rblModelTemplate_SelectedIndexChanged"
                        AutoPostBack="True" Style="margin-left: 50px;" RepeatColumns="5" RepeatDirection="Horizontal">
                    </asp:RadioButtonList><asp:HiddenField ID="hfSysModule" runat="server" />
                </td>
            </tr>
            <tr>
                <td height="30" align="center" class="form_tdText" style="width: 150px">功能模块名称： </td>
                <td height="30" align="left" class="form_td">
                    <asp:TextBox ID="txtSysModelName" runat="server" MaxLength="200" Width="200px" />
                    <span class="form_desc">功能模块的名称可以输入中英文字符</span> </td>
            </tr>
            <tr>
                <td height="30" align="center" class="form_tdText" style="width: 150px">功能模块描述： </td>
                <td height="30" align="left" class="form_td">
                    <asp:TextBox ID="txtSysModelDesc" runat="server" TextMode="MultiLine" CssClass="input_textarea"
                        Height="60px" Width="200px" />
                </td>
            </tr>
            <tr>
                <td height="30" align="center" class="form_tdText" style="width: 150px">数据表名： </td>
                <td height="30" align="left" class="form_td">
                    <asp:Label ID="Label1" runat="server" Text="Whir_U_" />
                    <asp:TextBox ID="txtSysTableName" runat="server" MaxLength="50" />
                    <span class="form_desc">功能模块在数据库中存在的表名，表的名称只能为英文字符，不包含数字、下划线等特殊字符</span> </td>
            </tr>
            <tr>
                <td height="30" align="left" class="form_tdText" style="width: 150px"></td>
                <td height="30" align="left" class="form_td">
                    <asp:Button ID="Button1" runat="server" CssClass="btn_default" OnClick="Button1_Click"
                        Text="提交" OnClientClick="return checkFormsys();" />
                    &nbsp;&nbsp;
                    <asp:Button ID="Button3" runat="server" CssClass="btn_default" Text="返回" OnClick="Button3_Click" /></td>
            </tr>
        </table>
        <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DADADA"
            style="margin-top: 10px;">
            <tr>
                <td class="form_td"><strong>
                    <asp:RadioButton ID="RadioButton3" runat="server" GroupName="sysGroup" Text="我导出的功能模块"
                        AutoPostBack="True" OnCheckedChanged="RadioButton3_CheckedChanged" /></strong>
                </td>
            </tr>
        </table>
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#DADADA"
            id="tbMy" runat="server" visible="false">
            <tr>
                <td height="30" align="left" class="form_td" colspan="2">
                    <asp:RadioButtonList ID="rblMyModelTemplate" runat="server" AutoPostBack="True" Style="margin-left: 50px;"
                        OnSelectedIndexChanged="rblMyModelTemplate_SelectedIndexChanged">
                    </asp:RadioButtonList><asp:HiddenField ID="hfMyModule" runat="server" />
                </td>
            </tr>
            <tr>
                <td height="30" align="center" class="form_tdText" style="width: 150px">功能模块名称： </td>
                <td height="30" align="left" class="form_td">
                    <asp:TextBox ID="txtMyModelName" runat="server" MaxLength="200" Width="200px" />
                    <span class="form_desc">功能模块的名称可以输入中英文字符</span> </td>
            </tr>
            <tr>
                <td height="30" align="center" class="form_tdText" style="width: 150px">功能模块描述： </td>
                <td height="30" align="left" class="form_td">
                    <asp:TextBox ID="txtMyModelDesc" runat="server" TextMode="MultiLine" CssClass="input_textarea"
                        Height="60px" Width="200px" />
                </td>
            </tr>
            <tr>
                <td height="30" align="center" class="form_tdText" style="width: 150px">数据表名： </td>
                <td height="30" align="left" class="form_td">
                    <asp:Label ID="Label2" runat="server" Text="Whir_U_" />
                    <asp:TextBox ID="txtMyTableName" runat="server" MaxLength="50" />
                    <span class="form_desc">功能模块在数据库中存在的表名，表的名称只能为英文字符，不包含数字、下划线等特殊字符</span> </td>
            </tr>
            <tr>
                <td height="30" align="left" class="form_tdText" style="width: 150px"></td>
                <td height="30" align="left" class="form_td">
                    <asp:Button ID="Button4" runat="server" CssClass="btn_default" Text="提交" OnClientClick="return checkMyForm();"
                        OnClick="Button4_Click" />
                    &nbsp;&nbsp;
                    <asp:Button ID="Button5" runat="server" CssClass="btn_default" Text="返回" OnClick="Button5_Click" /></td>
            </tr>
        </table>
        <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DADADA"
            style="margin-top: 10px;">
            <tr>
                <td class="form_td"><strong>
                    <asp:RadioButton ID="RadioButton2" runat="server" GroupName="sysGroup" Text="自定义功能模块"
                        OnCheckedChanged="RadioButton2_CheckedChanged" AutoPostBack="True" /></strong>
                </td>
            </tr>
        </table>
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#DADADA"
            id="tbcreate" runat="server" visible="false">
            <tr>
                <td height="30" align="center" class="form_tdText" style="width: 150px">选择模块： </td>
                <td height="30" align="left" class="form_td">
                    <asp:DropDownList ID="ddlModuleMark" runat="server" Width="200px">
                    </asp:DropDownList><span class="form_desc">一个模块可以包含多个功能模块</span> </td>
            </tr>
            <tr>
                <td height="30" align="center" class="form_tdText" style="width: 150px">功能模块名称： </td>
                <td height="30" align="left" class="form_td">
                    <asp:TextBox ID="txtModelName" runat="server" MaxLength="200" Width="200px" />
                    <span class="form_desc">功能模块的名称可以输入中英文字符</span> </td>
            </tr>
            <tr>
                <td height="30" align="center" class="form_tdText" style="width: 150px">功能模块描述： </td>
                <td height="30" align="left" class="form_td">
                    <asp:TextBox ID="txtModelDesc" runat="server" TextMode="MultiLine" CssClass="input_textarea"
                        Height="60px" Width="200px" />
                </td>
            </tr>
            <tr>
                <td height="30" align="center" class="form_tdText" style="width: 150px">数据表名： </td>
                <td height="30" align="left" class="form_td">
                    <asp:Label ID="lblTablePrefix" runat="server" Text="Whir_U_" />
                    <asp:TextBox ID="txtTableName" runat="server" MaxLength="50" />
                    <span class="form_desc">功能模块在数据库中存在的表名，表的名称只能为英文字符，不包含数字、下划线等特殊字符</span> </td>
            </tr>
            <tr>
                <td height="30" align="left" class="form_tdText" style="width: 150px"></td>
                <td height="30" align="left" class="form_td">
                    <asp:Button ID="btnSubmit" Text="提交" runat="server" OnClick="btnSubmit_Click" CssClass="btn_default"
                        OnClientClick="return checkForm();" />
                    &nbsp;&nbsp;
                    <asp:Button ID="Button2" runat="server" CssClass="btn_default" Text="返回" OnClick="Button2_Click" />
                </td>
            </tr>
        </table>
    </form>
</body>
</html>
<!-- 文本框的样式初始化-->

<script language="javascript" src="../../Js/common.js"></script>

<script type="text/javascript">initAutoFormStyle();</script>

<!-- 验证-->

<script language="javascript" type="text/javascript" src="../../../Script/Validate.js"></script>

<script type="text/javascript">
function checkFormsys(){
        var vs = [
        "txtSysModelName|noNull|请输入功能模块的名称，名称可以为中文、英文等！",
        "txtSysTableName|noNull|请输入功能模块在数据库中存在的表名，表的名称只能为英文！",
        "txtSysTableName|english|请输入英文字符，不包含数字、下划线！"
        ]; 
        if(Validator(vs))
           return true;
        else
            return false;    
}

function checkMyForm(){
        var vs = [ 
        "txtMyModelName|noNull|请输入功能模块的名称，名称可以为中文、英文等！",
        "txtMyTableName|noNull|请输入功能模块在数据库中存在的表名，表的名称只能为英文！",
        "txtMyTableName|english|请输入英文字符，不包含数字、下划线！"
        ]; 
        if(Validator(vs))
           return true;
        else
            return false;    
}

function checkForm(){
        var vs = [ 
        "txtModelName|noNull|请输入功能模块的名称，名称可以为中文、英文等！",
        "txtTableName|noNull|请输入功能模块在数据库中存在的表名，表的名称只能为英文！",
        "txtTableName|english|请输入英文字符，不包含数字、下划线！"
        ]; 
        if(Validator(vs))
           return true;
        else
            return false;    
}
</script>

